package Bugzilla::Query;
use 5.018;
use warnings;

use BugzillaJsonRpc::Bug;

sub getInfo
{
	my ($id,$cb) = @_;
	warn "getInfo $id";
	BugzillaJsonRpc::Bug::get($id, sub {
		my ($ret)= @_;
		my $info = {};
		unless ($ret->{error})
		{
			my $status = $ret->{result}{status};
			$info = {info => "status $status", error => 0};
		}
		else
		{
			$info = {error => 1};
		}
		$cb->($info);
	});
}
1;

